/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dahg.ues.speech.web;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import org.dahg.ues.speech.servicios.Servicio;
import org.dahg.ues.speech.servicios.modelo.Texto;

/**
 *
 * @author dahg
 */
@ManagedBean
//@SessionScoped
@ViewScoped
public class AlumnoBean {
    
    @ManagedProperty("#{service}")
    private Servicio service;
    
    private Texto texto;
    private String reconocido;
    
    @PostConstruct
    public void init() {
        updateText();
    }
    
    private void updateText() {
        texto = service.getRandomTexto();
    }

    public Servicio getService() {
        return service;
    }

    public void setService(Servicio service) {
        this.service = service;
    }

    public Texto getTexto() {
        return texto;
    }

    public void setTexto(Texto texto) {
        this.texto = texto;
    }

    public String getReconocido() {
        return reconocido;
    }

    public void setReconocido(String reconocido) {
        this.reconocido = reconocido;
    }
    
    
}
